home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / games / sokosrc.zoo / sokoban.h < prev    next >
C/C++ Source or Header  |  1991-01-26  |  3KB  |  130 lines

  1. /***********************************************************************
  2.    You may wish to alter the following directory paths
  3. ***********************************************************************/
  4.  
  5. /* The system you're compiling under */
  6. #define ATARIST    1
  7. #define UNIX 0
  8.  
  9. #if ATARIST
  10. #include <tos.h>
  11. #define get_char() Cnecin()
  12.  
  13. #define SCREENPATH ".\\screens"
  14. #define HELPFILE "sokoban.hlp"
  15. #define SAVEPATH "."
  16. #define SCOREFILE "sokoban.scr"
  17.  
  18. /* Pipe it all to stdout */
  19. #undef stderr
  20. #define stderr stdout
  21.  
  22. #else
  23.  
  24. #define get_char() getchar()
  25.  
  26. /**/
  27. /* SCREENPATH: the name of the directioy where the screen file are held */
  28. /**/
  29. #define SCREENPATH     "/yale/games/lib/sokoban/screens"
  30.  
  31. /**/
  32. /* HELPFILE: the full pathname of the helpfile */
  33. /**/
  34. #define HELPFILE       "/yale/games/lib/sokoban/sokoban.help"
  35.  
  36. /**/
  37. /* SAVEPATH: the name of the path where save files are held */
  38. /*           Attention: Be sure that there are no other files with */
  39. /*                      the name <username>.sav                    */
  40. /**/
  41. #define SAVEPATH       "/yale/games/lib/sokoban"
  42.  
  43. /**/
  44. /* LOCKPATH: temporary file which is created to ensure that no users */
  45. /*           work with the scorefile at the same time                */
  46. /**/
  47. #define LOCKFILE       "/tmp/sok.lock"
  48.  
  49. /**/
  50. /* SCOREFILE: the full pathname of the score file */
  51. /**/
  52. #define SCOREFILE      "/yale/games/lib/sokoban/sok.score"
  53. #endif
  54.  
  55. /**/
  56. /* MAXUSERNAME: defines the maximum length of a system's user name */
  57. /**/
  58. #define MAXUSERNAME    10
  59.  
  60. /**/
  61. /* MAXSCOREENTRIES: defines the maximum numner of entries in the scoretable */
  62. /**/
  63. #define MAXSCOREENTRIES        50
  64.  
  65. /**/
  66. /* SUPERUSER: defines the name of the game superuser */
  67. /**/
  68. #define SUPERUSER "wunk"
  69.  
  70. /**/
  71. /* PASSWORD: defines the password necessary for creating a new score file */
  72. /**/
  73. #define PASSWORD "nabokos"
  74.  
  75. /*************************************************************************
  76. ********************** DO NOT CHANGE BELOW THIS LINE *********************
  77. *************************************************************************/
  78. #define C_PLAYER       '@'
  79. #define C_PLAYERSTORE   '+'
  80. #define C_WALL         '#'
  81. #define C_GROUND       ' '
  82. #define C_STORE                '.'
  83. #define C_PACKET       '$'
  84. #define C_SAVE         '*'
  85.  
  86. #define MAXROW         20
  87. #define MAXCOL         40
  88.  
  89. typedef struct {
  90.    short x, y;
  91. } POS;
  92.  
  93. char *malloc();
  94. FILE *fopen();
  95.  
  96. #define storepos( p, a, b)    p.x = a; p.y = b;
  97.  
  98. #define E_FOPENSCREEN  1
  99. #define E_PLAYPOS1     2
  100. #define E_ILLCHAR      3
  101. #define E_PLAYPOS2     4
  102. #define E_TOMUCHROWS   5
  103. #define E_TOMUCHCOLS   6
  104. #define E_ENDGAME      7
  105. #define E_FOPENHELP    8
  106. #define E_NOUSER       9
  107. #define E_FOPENSAVE    10
  108. #define E_WRITESAVE    11
  109. #define E_STATSAVE     12
  110. #define E_READSAVE     13
  111. #define E_ALTERSAVE    14
  112. #define E_SAVED                15
  113. #define E_TOMUCHSE     16
  114. #define E_FOPENSCORE   17
  115. #define E_READSCORE    18
  116. #define E_WRITESCORE   19
  117. #define E_USAGE                20
  118. #define E_ILLPASSWORD  21
  119. #define E_LEVELTOOHIGH 22
  120. #define E_NOSUPER      23
  121. #define E_NOSAVEFILE   24
  122.  
  123.  
  124. typedef struct {
  125.     POS ppos;
  126.     POS tpos1, tpos2;
  127.     char lppc, ltp1c, ltp2c;
  128.     short action;
  129. } soko_state;
  130.